package com.ybkj.o2o.sales.service.impl;

import com.ybkj.o2o.sales.entity.ActivityManage;
import com.ybkj.o2o.sales.mapper.ActivityManageMapper;
import com.ybkj.o2o.sales.service.ActivityManageService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class DefaultActivityManageService implements ActivityManageService {

  @Autowired
  private ActivityManageMapper activityManageMapper;

  @Override
  public List<ActivityManage> selectActivityManage(String companyIds, String chainedAddress,
      String serviceType, Long sort, String showLocation, Integer offset, Integer size,
      String appKey) {

    return activityManageMapper.selectActivityManage(companyIds, chainedAddress, serviceType, sort,
        showLocation, offset, size, appKey);

  }

  @Override
  public List<ActivityManage> selectByCompanyId(String companyIds, String serviceType,
      Integer offset, Integer size, String appKey) {

    return activityManageMapper.selectByCompanyId(companyIds, serviceType, offset, size, appKey);

  }

  @Override
  public Long countActivityManage(String companyIds, String chainedAddress, String serviceType,
      Long sort, String showLocation, String appKey) {
    return activityManageMapper.countActivityManage(companyIds, chainedAddress, serviceType, sort,
        showLocation, appKey);

  }

  @Override
  public Long countByCompanyId(String companyIds, String serviceType, String appKey) {
    return activityManageMapper.countByCompanyId(companyIds, serviceType, appKey);

  }

  @Override
  public Long insert(ActivityManage activityManage) {
    return activityManageMapper.insertRecord(activityManage);
  }

  @Override
  public ActivityManage findOne(Long id, String appKey) {
    return activityManageMapper.findOne(id, appKey);
  }

  @Override
  public ActivityManage findByChainedAddress(String chainedAddress, String appKey) {
    return activityManageMapper.findChainedAddress(chainedAddress, appKey);
  }

  @Override
  public int update(ActivityManage activityManage) {
    return activityManageMapper.update(activityManage);
  }

  @Override
  public void delete(Long id, String appKey) {
    activityManageMapper.deleteById(id, appKey);
  }



}
